package com.study.mike.common.constants;

/**
 * @author zhouhp
 * @date 2022/4/13
 **/
public final class RedisKey {

    static final private String PREFIX = "mike:";

    /**
     * Id生成器空间
     */
    static final public String ID_NAMESPACE = PREFIX + "generator:prefix:";

    /**
     * 方法结果缓存
     */
    static final public String INTERFACE_RESULT = PREFIX + "interfaceResult";

    /**
     * 使用以下缓存名称，会在指定的时间过期
     */
    static final public String HALF_HOUR = INTERFACE_RESULT + ":halfHour";
    static final public String TWO_HOUR = INTERFACE_RESULT + ":twoHour";
    static final public String SIX_HOUR = INTERFACE_RESULT + ":sixHour";
    static final public String ONE_DAY = INTERFACE_RESULT + ":oneDay";
    static final public String ONE_HOUR = INTERFACE_RESULT + ":oneHour";

    /**
     * 分布式锁键名前缀
     */
    static final public String REDISSON_LOCK = PREFIX + "lock:";
}
